Matthias Clasen [Sat, 9 May 2020 00:02:55 +0000 (20:02 -0400)]
Drop gtkcontainer.h includes
These includes are unused.
Matthias Clasen [Fri, 8 May 2020 19:31:02 +0000 (15:31 -0400)]
box: Derive from GtkWidget
Matthias Clasen [Fri, 8 May 2020 19:58:57 +0000 (15:58 -0400)]
assistant: Remove code that doesn't work anymore
When GtkContainer goes away, we don't have
an "add" signal anymore.
Matthias Clasen [Fri, 8 May 2020 19:31:19 +0000 (15:31 -0400)]
dialog: Remove code that doesn't work anymore
When GtkContainer goes away, we don't have an
"add" signal anymore.
Matthias Clasen [Fri, 8 May 2020 19:45:36 +0000 (15:45 -0400)]
shortcutssection: Drop container bits
When GtkBox stops being a container, GtkShortcutsSection
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
Matthias Clasen [Sat, 9 May 2020 01:08:20 +0000 (21:08 -0400)]
shortcutsgroup: Drop container bits
When GtkBox stops being a container, GtkShortcutsGroup
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
Matthias Clasen [Sat, 9 May 2020 12:26:52 +0000 (08:26 -0400)]
Replace most remaining uses of container api
These are all on GtkBox or enumerating children.
Matthias Clasen [Fri, 8 May 2020 16:21:30 +0000 (12:21 -0400)]
box: Add gtk_box_append/prepend/remove
Add replacement api for gtk_container_add/remove.
Matthias Clasen [Fri, 8 May 2020 15:22:16 +0000 (11:22 -0400)]
notebook: Derive from GtkWidget
Matthias Clasen [Fri, 8 May 2020 14:57:21 +0000 (10:57 -0400)]
Stop using container api on GtkNotebook
Matthias Clasen [Fri, 8 May 2020 13:37:52 +0000 (09:37 -0400)]
headerbar: Derive from GtkWidget
Matthias Clasen [Fri, 8 May 2020 13:26:11 +0000 (09:26 -0400)]
Stop using container api on GtkHeaderBar
Matthias Clasen [Fri, 8 May 2020 13:19:21 +0000 (09:19 -0400)]
headerbar: Add gtk_header_bar_remove
This is a replacement for gtk_container_remove.
Matthias Clasen [Fri, 8 May 2020 12:48:00 +0000 (08:48 -0400)]
listbox: Derive from GtkWidget
Matthias Clasen [Sat, 9 May 2020 03:03:53 +0000 (23:03 -0400)]
testsuite: Fix listbox tests
When moving from gtk_container_forall to the widget dom
api, we are now iterating over all children of the listbox,
including headers, separators, etc. So, skip everything
that is not a listboxrow, to make the tests work again.
Matthias Clasen [Sat, 9 May 2020 02:39:51 +0000 (22:39 -0400)]
testsuite: Redo listbox sort test
This test was relying on gtk_container_forall returning
the visual (ie sorted) order of children, while iterating
with the widget dom api gives the insertion order.
Instead of using gtk_container_forall, use
gtk_list_box_row_get_index to reconstruct the visual
order.
Matthias Clasen [Fri, 8 May 2020 06:19:18 +0000 (02:19 -0400)]
Don't use container api on GtkListBox
Matthias Clasen [Fri, 8 May 2020 05:50:37 +0000 (01:50 -0400)]
listbox: Add gtk_list_box_remove
This is a gtk_container_remove replacement.
Matthias Clasen [Fri, 8 May 2020 05:47:19 +0000 (01:47 -0400)]
buildable: Cosmetics
Don't refer to GtkContainer in the docs.
Matthias Clasen [Fri, 8 May 2020 05:44:11 +0000 (01:44 -0400)]
customlayout: Cosmetics
Don't refer to GtkContainer in the docs.
Matthias Clasen [Fri, 8 May 2020 05:05:06 +0000 (01:05 -0400)]
textviewchild: Derive from GtkWidget
GtkContainer is going away.
Matthias Clasen [Fri, 8 May 2020 04:25:47 +0000 (00:25 -0400)]
text: Fix popover use
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
Matthias Clasen [Fri, 8 May 2020 04:23:44 +0000 (00:23 -0400)]
textview: Fix popover use
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
Matthias Clasen [Sun, 10 May 2020 01:03:35 +0000 (21:03 -0400)]
flowbox: Derive from GtkWidget
Matthias Clasen [Fri, 8 May 2020 03:24:58 +0000 (23:24 -0400)]
Stop using container api on GtkFlowBox
GtkContainer is going away.
Matthias Clasen [Fri, 8 May 2020 00:24:05 +0000 (20:24 -0400)]
flowbox: Add gtk_flow_box_remove
This is the replacement for gtk_container_remove.
Matthias Clasen [Thu, 7 May 2020 20:04:42 +0000 (16:04 -0400)]
stack: Derive from GtkWidget
Matthias Clasen [Sun, 10 May 2020 01:03:10 +0000 (21:03 -0400)]
treepopover: Stop using container api
Matthias Clasen [Sun, 10 May 2020 01:02:56 +0000 (21:02 -0400)]
shortcutswindow: Stop using container api
Matthias Clasen [Sun, 10 May 2020 01:02:33 +0000 (21:02 -0400)]
shortcutssection: Stop using container api
Matthias Clasen [Sun, 10 May 2020 01:01:24 +0000 (21:01 -0400)]
Don't use container api on GtkStack
Matthias Clasen [Thu, 7 May 2020 19:49:04 +0000 (15:49 -0400)]
stack: Add gtk_stack_remove
This is a replacement for gtk_container_remove.
Matthias Clasen [Thu, 7 May 2020 19:40:20 +0000 (15:40 -0400)]
fixed: Derive from GtkWidget
Matthias Clasen [Thu, 7 May 2020 19:09:28 +0000 (15:09 -0400)]
Stop using container api on GtkFixed
GtkContainer is going away.
Matthias Clasen [Thu, 7 May 2020 19:02:39 +0000 (15:02 -0400)]
fixed: Add gtk_fixed_remove
This is the replacement for gtk_container_reomve.
Matthias Clasen [Thu, 7 May 2020 18:56:37 +0000 (14:56 -0400)]
grid: Derive from GtkWidget
GtkContainer is going away.
Matthias Clasen [Fri, 8 May 2020 16:29:58 +0000 (12:29 -0400)]
grid: Remove a test for grid container functionality
This test was specifically testing how gtk_container_add
behaves on grids. Well, it doesn't anymore.
Matthias Clasen [Thu, 7 May 2020 18:23:36 +0000 (14:23 -0400)]
Avoid container api on grids
GtkContainer is going away.
Matthias Clasen [Thu, 7 May 2020 18:22:12 +0000 (14:22 -0400)]
grid: Add gtk_grid_remove
This is a replacement for gtk_container_remove.
Matthias Clasen [Thu, 7 May 2020 17:00:51 +0000 (13:00 -0400)]
infobar: Derive from GtkWidget
GtkContainer is going away.
Matthias Clasen [Thu, 7 May 2020 16:52:49 +0000 (12:52 -0400)]
Use gtk_info_bar_add_child throughout
Matthias Clasen [Thu, 7 May 2020 16:49:15 +0000 (12:49 -0400)]
infobar: Add gtk_info_bar_add/remove_child
This is a replacement for container api that is going away.
Matthias Clasen [Thu, 7 May 2020 16:28:33 +0000 (12:28 -0400)]
infobar: Add gtk_info_bar_remove_action_widget
This is mainly for completeness, since gtk_container_remove
will not work for those anymore.
Matthias Clasen [Thu, 7 May 2020 12:30:39 +0000 (08:30 -0400)]
paned: Redo the api
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
Matthias Clasen [Thu, 7 May 2020 05:02:01 +0000 (01:02 -0400)]
paned: Drop some dead code
Matthias Clasen [Thu, 7 May 2020 04:47:25 +0000 (00:47 -0400)]
iconview: Derive from GtkWidget
GtkIconView is not a container.
Matthias Clasen [Thu, 7 May 2020 04:16:08 +0000 (00:16 -0400)]
expander: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2719
Matthias Clasen [Thu, 7 May 2020 04:05:51 +0000 (00:05 -0400)]
Use gtk_expander_set_child throughout
Replace all uses of gtk_container_add on expanders
with gtk_expander_set_child.
Matthias Clasen [Thu, 7 May 2020 04:02:42 +0000 (00:02 -0400)]
expander: Add a child property
Matthias Clasen [Thu, 7 May 2020 03:54:11 +0000 (23:54 -0400)]
actionbar: Derive from GtkWidget
GtkContainer is going away.
Matthias Clasen [Thu, 7 May 2020 03:42:32 +0000 (23:42 -0400)]
actionbar: Add gtk_action_bar_remove
This is a replacement for gtk_container_remove.
Matthias Clasen [Tue, 5 May 2020 11:27:04 +0000 (07:27 -0400)]
treeview: Derive from GtkWidget
Drop the GtkContainer vfuncs.
Matthias Clasen [Tue, 5 May 2020 02:40:15 +0000 (22:40 -0400)]
treeview: Stop using container api
Matthias Clasen [Tue, 5 May 2020 02:30:46 +0000 (22:30 -0400)]
textview: Derive from GtkWidget
Drop the GtkContainer vfuncs. As a replacement for
gtk_container_remove, make gtk_text_view_remove public.
Matthias Clasen [Fri, 8 May 2020 23:57:34 +0000 (19:57 -0400)]
dragicon: drop gtkcontainer.h include
We don't need it anymore here.
Matthias Clasen [Tue, 12 May 2020 00:31:14 +0000 (20:31 -0400)]
textviewchild: Don't leak children
Like everybody else, GtkTextViewChild must
unparent its children in dispose.
Matthias Clasen [Fri, 8 May 2020 16:27:25 +0000 (12:27 -0400)]
Fix a leftover window
We were still using container api on a window here.
Matthias Clasen [Fri, 8 May 2020 16:26:50 +0000 (12:26 -0400)]
Fix a leftover list box child
We were still using container api on a list box child here.
Matthias Clasen [Fri, 8 May 2020 05:30:12 +0000 (01:30 -0400)]
window: Fix accessible implementation
Now that GtkWindow is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:29:17 +0000 (01:29 -0400)]
statusbar: Fix accessible implementation
Now that GtkStatusBar is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:28:30 +0000 (01:28 -0400)]
scrolledwindow: Fix accessible implementation
Now that GtkScrolledWindow is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:27:41 +0000 (01:27 -0400)]
popover: Fix accessible implementation
Now that GtkPopover is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:25:49 +0000 (01:25 -0400)]
frame: Fix accessible implementation
Now that GtkFrame is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:24:48 +0000 (01:24 -0400)]
flowboxchild: Fix accessible implementation
Now that GtkFlowBoxChild is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:22:30 +0000 (01:22 -0400)]
combobox: Fix accessible implementation
Now that GtkComboBox is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:20:53 +0000 (01:20 -0400)]
listboxrow: Fix the accessible implementation
GtkListBoxRow is no longer a container, update
the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:11:22 +0000 (01:11 -0400)]
button: Fix accessible implementation
Now that GtkButton is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 13:13:37 +0000 (09:13 -0400)]
Cosmetics: Replace GtkContainer in an error message
GtkWidget is not that much better here, unfortunately.
Adapt the testsuite to match.
Matthias Clasen [Mon, 11 May 2020 19:08:53 +0000 (19:08 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
print-editor: Bring back the menubar
See merge request GNOME/gtk!1875
Matthias Clasen [Mon, 11 May 2020 18:51:20 +0000 (18:51 +0000)]
Merge branch 'wip/exalm/2242-test' into 'master'
tests: Add a headerbar-in-window test case
See merge request GNOME/gtk!1878
Matthias Clasen [Mon, 11 May 2020 18:40:34 +0000 (18:40 +0000)]
Merge branch 'wip/tintou/doc-fixes' into 'master'
docs: Fix several missing references in the documentation
See merge request GNOME/gtk!1874
Matthias Clasen [Mon, 11 May 2020 18:26:31 +0000 (14:26 -0400)]
printeroptionwidget: Avoid a critical
The new_location can be NULL, as we clearly
knew earlier in the function. We've forgotten
about that by the time we unref it :(
Matthias Clasen [Mon, 11 May 2020 18:25:57 +0000 (14:25 -0400)]
headerbar: Don't clean up other widget children
The parent of the title_widget is the center box,
it needs to call gtk_widget_unparent on it.
Emmanuele Bassi [Mon, 11 May 2020 18:25:39 +0000 (18:25 +0000)]
Merge branch 'cherry-pick-
6d8fb83a' into 'master'
aboutdialog: Update precondition checks for new licenses added in 3.24.20
Closes #2734
See merge request GNOME/gtk!1877
Matthias Clasen [Mon, 11 May 2020 18:23:58 +0000 (14:23 -0400)]
filechooserdialog: Be more careful with widgets
We were stepping on our own toes, by first setting
up a save entry and telling the filechooserwidget
about it, and then nuking it by setting a title
on the headerbar. The filechooserwidget wasn't
ready for the entry to die without anybody telling
it.
This fixes a crash when using the filechooser for
print-to-file in the print dialog.
Alexander Mikhaylenko [Mon, 11 May 2020 17:37:58 +0000 (22:37 +0500)]
tests: Add a headerbar-in-window test case
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2242
Simon McVittie [Mon, 11 May 2020 17:12:08 +0000 (17:12 +0000)]
aboutdialog: Update precondition checks for new licenses added in 3.24.20
To avoid making this mistake again, add a static assertion that the
enum is in sync with gtk_license_info, and use the length of
gtk_license_info for the precondition check.
Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: #2734
Corentin Noël [Mon, 11 May 2020 16:47:20 +0000 (18:47 +0200)]
docs: Fix several missing references in the documentation
This fixes several typos and missing references
Matthias Clasen [Mon, 11 May 2020 17:15:59 +0000 (17:15 +0000)]
Merge branch 'window-destroy' into 'master'
Drop gtk_widget_destroy
See merge request GNOME/gtk!1864
Matthias Clasen [Mon, 11 May 2020 16:55:15 +0000 (12:55 -0400)]
print-editor: Bring back the menubar
This was the one place where we relied on
the menubar fallback in GtkApplicationWindow.
So turn it on explicitly.
Matthias Clasen [Sun, 10 May 2020 00:01:21 +0000 (20:01 -0400)]
Update the docs
Remove various references to gtk_widget_destroy in the docs.
Matthias Clasen [Sat, 9 May 2020 20:46:40 +0000 (16:46 -0400)]
Unset tooltip window earlier
This avoids a crash when the tooltip window tries
to update its action muxers.
Matthias Clasen [Sat, 9 May 2020 19:55:20 +0000 (15:55 -0400)]
window: Remove _set_has_user_ref_count
Timm Bäder [Tue, 26 Sep 2017 15:04:51 +0000 (17:04 +0200)]
testsuite: add widget refcount test case
Testing toplevels and popovers.
Matthias Clasen [Sat, 9 May 2020 19:45:54 +0000 (15:45 -0400)]
widget: Drop gtk_widget_destroy
Matthias Clasen [Sat, 9 May 2020 19:20:59 +0000 (15:20 -0400)]
window: Implement gtk_window_destroy
Don't call gtk_widget_destroy; instead implement
gtk_window_destroy outselves by removing the window
from the toplevel lista and dropping the reference that
GTK holds.
Matthias Clasen [Sat, 9 May 2020 14:33:02 +0000 (10:33 -0400)]
Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
Matthias Clasen [Sat, 9 May 2020 14:26:22 +0000 (10:26 -0400)]
Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
Matthias Clasen [Sat, 9 May 2020 13:30:29 +0000 (09:30 -0400)]
window: Add gtk_window_destroy
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
Matthias Clasen [Sat, 9 May 2020 20:05:08 +0000 (16:05 -0400)]
nativedialog: Do not ref the transient_for parent
gtk_window_set_transient_for does not ref its parent either. This is
important because a child widget of the parent might be the one calling
this function.
This was showing up as widget-factory not existing on close after
opening the file chooser.
Matthias Clasen [Sat, 9 May 2020 21:31:18 +0000 (17:31 -0400)]
testsuite: Clean up unexpected children
If you call gtk_widget_set_parent on an unsuspecting
parent widget, it is your reponsibility to clean up
before the parent gets finalized.
Matthias Clasen [Sat, 9 May 2020 19:20:15 +0000 (15:20 -0400)]
popover: Fix a reference leak
Don't leak the reference to the default widget.
Matthias Clasen [Sat, 9 May 2020 19:19:39 +0000 (15:19 -0400)]
filechooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 18:14:55 +0000 (14:14 -0400)]
colorchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 18:10:38 +0000 (14:10 -0400)]
fontchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 16:09:13 +0000 (12:09 -0400)]
Drop gtk_widget_destroyed
Use g_object_add_weak_pointer or a weak reference instead.
Matthias Clasen [Sat, 9 May 2020 16:03:11 +0000 (12:03 -0400)]
Stop using gtk_widget_destroyed
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
Matthias Clasen [Mon, 11 May 2020 15:52:24 +0000 (15:52 +0000)]
Merge branch 'wip/exalm/test' into 'master'
Fix (most of the) tests
See merge request GNOME/gtk!1873
Matthias Clasen [Mon, 11 May 2020 15:23:40 +0000 (15:23 +0000)]
Merge branch 'teardown-cleanup-2' into 'master'
Treeview teardown cleanup
See merge request GNOME/gtk!1872
Alexander Mikhaylenko [Mon, 11 May 2020 14:57:25 +0000 (19:57 +0500)]
tests: Stop explicitly showing widgets